﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="d" uri="/WEB-INF/resource.tld" %>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
  <title>人马君</title>
</head>
<body>
  <%@ include file="/WEB-INF/include/header.jsp"%>
  <%@ include file="/WEB-INF/include/menu.jsp"%>
  <div class="container main-content">
    <div class="panel panel-default x-panel x-panel-layout">
      <div class="panel-heading">
        <ol class="breadcrumb">
          <li><a href="${ctx.host}/ecommerce">电商管理</a></li>
          <li class="active">课程排期</li>
          <li class="no-before pull-right" style="min-width: 65px;">
            <a onclick="window.history.back();"><i class="glyphicon glyphicon-arrow-left"></i>&nbsp;&nbsp;返回</a>
          </li>
        </ol>
      </div>

      <div class="panel-body">
        <div class="col-xs-2 x-panel-layout-left no-horizontal-padding">
          <%@ include file="/WEB-INF/include/submenu.jsp"%>
        </div>

        <div class="col-xs-10 x-panel-layout-right">
          <div class="x-breadcrumb-wrapper">
            <div class="x-breadcrumb clearfix">
              <h2><i class="glyphicon glyphicon-fire" title="1v1课程详情"></i>&nbsp;&nbsp;<span>课程排期&nbsp;-&nbsp;1v1课程详情</span></h2>
            </div>
          </div>

          <div class="x-breadcrumb-wrapper" >
            <div class="x-breadcrumb-wrapper top-margin-20" style="position: relative;">
              <ul class="nav nav-pills x-breadcrumb-nav">
                <li role="presentation">
                  <a href="${ctx.host}/year-rounds/${courseRound.id}?status=${status}" role="tab" >基本信息</a>
               </li>
               <c:if test="${not empty courseRound.fitnessGroup}">
                 <li class="pull-left"><a href="${ctx.host}/year-rounds/${courseRound.id}/batch-coursewares/1?type=weekly&status=${courseRound.courseStatus.alias}">家庭作业</a></li>
                 <li class="pull-left"><a href="${ctx.host}/year-rounds/${courseRound.id}/batch-coursewares/1?type=course&status=${courseRound.courseStatus.alias}&day=1">上课课件</a></li>
               </c:if>
               <c:if test="${!courseRound.courseStatus.prepare and status!='prepare'}">
                <li role="presentation "  class="active">
                  <a href="${ctx.host}/year-rounds/${courseRound.id}/physical-data?status=${status}" role="tab" >身体数据</a>
                </li>
              </c:if>
              </ul>
            </div>

            <div class="clearfix">
              <div class="x-breadcrumb-wrapper" style="margin-top:20px;">
                <div class="x-breadcrumb yellow clearfix">
                  <h2>
                    <span>Inbody数据</span>
                  </h2>
                </div>
              </div>
  
              <table class="table table-striped table-hover x-table" style="margin-bottom:20px;">
                <thead>
                  <tr>
                    <th>姓名<br />手机</th>
                    <th>来源</th>
                    <th>年龄<br />性别</th>
                    <th>体重</th>
                    <th>骨骼肌</th>
                    <th>体脂肪</th>
                    <th>体脂率</th>
                    <th>BMI值</th>
                    <th>腰臀比</th>
                    <th>基础代谢</th>
                    <th>测试时间</th>
                  </tr>
                </thead>
                <tbody>
                  <c:forEach var="inbodyRecord" items="${inbodyRecords}">
                    <tr>
                      <td>${inbodyRecord.name}<br />${inbodyRecord.mobile}</td>
                      <td>${inbodyRecord.source}</td>
                      <td>${inbodyRecord.age}<br />${inbodyRecord.gender.description}</td>
                      <td>${inbodyRecord.weightMax}/${inbodyRecord.weightMin}<br />${inbodyRecord.weight}</td>
                      <td>${inbodyRecord.smMax}/${inbodyRecord.smMin}<br />${inbodyRecord.sm}</td>
                      <td>${inbodyRecord.bfMax}/${inbodyRecord.bfMin}<br />${inbodyRecord.bf}</td>
                      <td>${inbodyRecord.bfrMax}/${inbodyRecord.bfrMin}<br />${inbodyRecord.bfr}</td>
                      <td>${inbodyRecord.bmiMax}/${inbodyRecord.bmiMin}<br />${inbodyRecord.bmi}</td>
                      <td>${inbodyRecord.whrMax}/${inbodyRecord.whrMin}<br />${inbodyRecord.whr}</td>
                      <td>${inbodyRecord.bmMax}/${inbodyRecord.bmMin}<br />${inbodyRecord.bm}</td>
                      <td>${inbodyRecord.recordTime}</td>
                    </tr>
                  </c:forEach>
                </tbody>
              </table>

              <div class="x-breadcrumb-wrapper" style="margin-top:20px;">
                <div class="x-breadcrumb yellow clearfix">
                  <h2>
                    <span>三围数据</span>
                  </h2>
                  <div class="btn-group pull-right">
				    <a href="${ctx.host}/individual-rounds/${courseRound.id}/bwh-add" data-toggle="modal" data-target="#bwh-add" class="btn btn-default x-btn btn-shadow btn-shadow-default">
				      <i class="glyphicon glyphicon-plus"></i>&nbsp;&nbsp;添加
				    </a>
				  </div>
                </div>
              </div>

              <table class="table table-striped table-hover x-table" style="margin-bottom:20px;">
                <thead>
                  <tr>
                    <th>测量时间</th>
                    <th>胸围</th>
                    <th>腰围</th>
                    <th>臀围（臂围）</th>
                    <th>操作</th>
                  </tr>
                </thead>
                <tbody>
                  <c:forEach var="bwhRecord" items="${inbodyBwhs}">
                    <tr>
                      <td>${bwhRecord.recordTime}</td>
                      <td>${bwhRecord.bust}</td>
                      <td>${bwhRecord.waist}</td>
                      <td>${bwhRecord.hips}</td>
                      <td>
                        <c:if test="${currentPrincipal.root or currentPrincipal.admin or empty bwhRecord.bust or bwhRecord.bust eq 0 or empty bwhRecord.waist or bwhRecord.waist eq 0 or empty bwhRecord.hips or bwhRecord.hips eq 0}">
                          <a href="${ctx.host}/offline-students/${courseRound.student.id}/bwh?bwhId=${bwhRecord.id}"
                  data-toggle="modal" data-target="#bwh-edit">修改</a>
                        </c:if>
                      </td>
                    </tr>
                  </c:forEach>
                </tbody>
              </table>

              <div class="x-breadcrumb-wrapper" style="margin-top:20px;">
                <div class="x-breadcrumb yellow clearfix">
                  <h2>
                    <span>学员目标数据</span>
                  </h2>
                </div>
              </div>

              <table class="table table-striped table-hover x-table" style="margin-bottom:20px;">
                <thead>
                  <tr>
                    <th>阶段数据目标</th>
                    <th>长期目标</th>
                    <th>创建时间</th>
                  </tr>
                </thead>
                <tbody>
                  <c:forEach var="target" items="${targetDatas}">
                    <tr>
                      <td>${target.shortTarget}</td>
                      <td>${target.longTarget}</td>
                      <td><fmt:formatDate pattern="yyyy-MM-dd" value="${target.createTime}" /></td>
                    </tr>
                  </c:forEach>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource root="${ctx.resource}/build" type="script" src="js/page/course/round-view.js">
    <script type="text/javascript">
      require(['page/course/round-view'], function(page) {
        page.init()
      })
    </script>
  </d:resource>
</body>
</html>
